;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages css)
  #:use-module (guix build-system copy)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages ninja)
  #:use-module (gnu packages web)
  #:use-module (gnu packages))

(define-public css-milligram
  (package
   (name "css-milligram")
   (version "1.4.1")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/milligram/milligram")
           (commit (string-append "v" version))))
     (file-name (git-file-name name version))
     (sha256
      (base32 "147c8v8qhyzqlnqssnf0wy7bxfyr81il9nyc7qanbfmvvnz7md0a"))))
   (build-system copy-build-system)
   (arguments
    '(#:install-plan
      '(("./dist/milligram.min.css" "css/"))))
   (home-page "https://milligram.io/")
   (synopsis "Minimalist CSS framework")
   (description
"@code{css-milligram} provides a minimal setup of styles for a fast
and clean starting point.  Just it! Only 2kb gzipped! It's not about a
UI framework.")
   (license license:expat)))

(define-public css-mvp
  (package
   (name "css-mvp")
   (version "1.8")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/andybrewer/mvp")
           (commit (string-append "v" version))))
     (file-name (git-file-name name version))
     (sha256
      (base32 "10i744hf7m26lsqsqny8sf18s7gqxcvryj5f9xqdfdr2psxf9af6"))))
   (build-system copy-build-system)
   (arguments
    '(#:install-plan
      '(("./mvp.css" "css/"))))
   (home-page "https://andybrewer.github.io/mvp/")
   (synopsis "Minimalist stylesheet for HTML elements")
   (description
"@code{css-mvp} provides an out of the box CSS styling for HTML
elements.  No class names, no framework to learn.")
   (license license:expat)))

(define-public css-mini-css
  (package
   (name "css-mini-css")
   (version "3.0.1")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/Chalarangelo/mini.css")
           (commit (string-append "v" version))))
     (file-name (git-file-name name version))
     (sha256
      (base32 "0fgp7hqfv5qvbgvkvf8k00ac5div0lmc3gm3rk6x7k5qsdhvcfhg"))))
   (build-system copy-build-system)
   (arguments
    '(#:install-plan
      ;; package default and nord themes
      ;; https://github.com/Chalarangelo/mini.css/tree/master/dist
      '(("./dist/mini-dark.min.css" "css/"))))
   (home-page "https://minicss.org/")
   (synopsis "Minimal, responsive, style-agnostic CSS framework")
   (description
"@code{css-mini-css} is a lightweight CSS framework (under 7KB gzipped)
designed with mobile devices and modern browsers in mind.  Responsiveness,
ease of use and customization are some of the main features of the
framework, while accessibility and extensive documentation are some of
the secondary focuses of the project.  The framework is written using Sass,
while most of its components are based on Flexbox.")
   (license license:expat)))

(define-public css-spcss
  (package
   (name "css-spcss")
   (version "0.8.0")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/susam/spcss")
           (commit version)))
     (file-name (git-file-name name version))
     (sha256
      (base32 "0r9h30l3i76xb1s21fq3nwyg7lvd6aii0s61qf6h4cgf8zbhmnry"))))
   (build-system copy-build-system)
   (arguments
    '(#:install-plan
      '(("./sp.min.css" "css/"))))
   (home-page "https://github.com/susam/spcss/")
   (synopsis "Simple, minimal, classless stylesheet for simple HTML pages")
   (description
"@code{css-spcss} is a simple and plain stylesheet for simple text-based
websites.")
   (license license:expat)))

(define-public css-wing
  ;; releases are way behind master
  (let ((commit "5792c1cf1a5c5a22bba39b4272429e0ce55953ba")
        (revision "0"))
    (package
     (name "css-wing")
     (version (git-version "20190309" revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/kbrsh/wing")
             (commit commit)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0hsdimg73y9qbkbinsl5qqly13khn6dpam40jg8797ml32mzhln8"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
        '(("./dist/wing.min.css" "css/"))))
     (home-page "https://kbrsh.github.io/wing/")
     (synopsis "Beautiful CSS framework designed for minimalists")
     (description
"@code{css-wing} provides everything you need to create a basic project
is included, all in a 2kb file (minified + gzipped).  On top of that,
almost everything is styled automatically, without the need for learning
specific classes.  This allows for an intuitive experience developing with
Wing, as it's designed to be a boilerplate stylesheet for any project.")
     (license license:expat))))

(define-public css-micro-reset
  ;; releases are way behind master
  (let ((commit "ec687a7bca3bb1f426eb1cba3521e2ad33cca53e")
        (revision "0"))
    (package
     (name "css-micro-reset")
     (version (git-version "20210412" revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/vladocar/CSS-Micro-Reset")
             (commit commit)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0wz21cry4fqlksb9l9dixj777xaa6c5q1h41fd8iw8ibq97vaab2"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
        '(("./micro-css-reset.css" "css/"))))
     (home-page "")
     (synopsis "Minimal barebone CSS Reset")
     (description
"@code{css-micro-reset} provides a minimal barebone CSS Reset.")
     (license license:expat))))

(define-public css-microtip
  ;; there are no releases
  (let ((commit "3a5288376d451e421666680983788cb0a519089d")
        (revision "0"))
    (package
     (name "css-microtip")
     (version (git-version "20200411" revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/ghosh/microtip")
             (commit commit)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "11d7h0f8w4wpn60ng4jnnjp9gzbamkbxvn1kfbqvl5rk2vypgj9q"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
        '(("./microtip.min.css" "css/"))))
     (home-page "https://microtip.vercel.app/")
     (synopsis "Minimal, accessible, ultra lightweight css tooltip library")
     (description
"@code{css-microtip} is a modern, minimal css tooptip library with
accessibility baked in.  Just 1kb minified and gzipped.")
     (license license:expat))))

(define-public css-carbslinux-style
  (let ((commit "18b3130fe5d639110c289717fdbcce6bdc5c4c1f")
        (revision "0"))
    (package
     (name "css-carbslinux-style")
     (version (git-version "20211025" revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://git.carbslinux.org/carbslinux-style")
             (commit commit)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0m7zdz8dfv25hmxkdv23bdmpqcd0c7spcqfvxvkwxih8fjk7n38d"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
        '(("./carbslinux.min.css" "css/"))))
     (native-inputs
       (list sassc ninja)) ; TODO
     (home-page "https://carbslinux-style.io/")
     (synopsis "Common style for Carbs Linux projects")
     (description
"@code{css-carbslinux-style} provides the common css styles used by
Carbs Linux projects.")
     (license license:cc0))))

